<?php
namespace Think;
class type
{
    public function get()
    {
        return array(
            'banner' => array(
                'name' => '图片显示位置',
                'child' => array(
                    'index' => '首页',
                    'list' => '列表页',
                ),
            ),

        );
    }

    public function getChilds($name)
    {
        $arr = $this->get();
        foreach ($arr as $k => $v) {
            if ($name == $v['name']) {
                $data[] = $v['child'];
                break;
            }
        }
        return $data;
    }
}

?>